package com.prjServlet.service;

import java.util.*;

import com.prjServlet.Factory.DaoFactory;
import com.prjServlet.Interface.DeptDaoInterface;
import com.prjServlet.Interface.DeptServiceInterface;
import com.prjServlet.model.Dept;

public class DeptService implements DeptServiceInterface {
	DeptDaoInterface deptDao = DaoFactory.creatDeptDao();
	public List<Dept> findAll() {
		List<Dept> list = new ArrayList<Dept>();
		try {
			list = deptDao.findAll();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}
	public List<Dept> findAll(String args) throws Exception {
		List<Dept> list = new ArrayList<Dept>();
		try {
			list = deptDao.findAll(args);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

}
